using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class frm_Type2Map : EntityTypeConfiguration<frm_Type2>
    {
        public frm_Type2Map()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(50);

            this.Property(t => t.Code)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("frm_Type2");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.FormWidth).HasColumnName("FormWidth");
            this.Property(t => t.FormHeight).HasColumnName("FormHeight");
            this.Property(t => t.ToolbarOrientation).HasColumnName("ToolbarOrientation");
            this.Property(t => t.Columns).HasColumnName("Columns");
            this.Property(t => t.ShowItemHint).HasColumnName("ShowItemHint");
            this.Property(t => t.Mode).HasColumnName("Mode");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.FormTop).HasColumnName("FormTop");
            this.Property(t => t.FormLeft).HasColumnName("FormLeft");
        }
    }
}
